#pragma once

#include "BaseDocument.h"
#include "TrayConfig.h"
#include <includeBase.h>

class TrayConfigsDoc : public BaseDocument
{

public: // IJsonSerializable
    void fromJson(const QJsonObject& src, QStringList& errorList) override;
    QJsonObject toJson() const override;

public:
    shared_ptr<TrayConfig> get(const QString& key);
    void set(shared_ptr<TrayConfig> value);

    shared_ptr<map<QString, shared_ptr<TrayConfig>>> data() { return m_data; }

private: // Fields
    shared_ptr<map<QString, shared_ptr<TrayConfig>>> m_data =
        make_shared<map<QString, shared_ptr<TrayConfig>>>();
};
